
#ifndef FORMATDIALOG_H
#define FORMATDIALOG_H

#include <BButton>
#include <BSpinBox>
#include <BLineEdit>
#include <BGroupBox>
#include <BDialog>
#include "TextFormat.h"

class FormatDialog : public BDialog
{
	BOBJECT(FormatDialog);
public:
	FormatDialog(BWidget* parent = 0);
	~FormatDialog();

	virtual bool setAsset(const BValue& asset);

protected:
	void freshCodeItem();
	void freshLineItem();

protected:
	void slotFormatClear(BObject* object, const BValue& value);
	void slotFormatChanged(BObject* object, const BValue& value);
	void slotCodeItemChanged(BObject* object, const BValue& value);
	void slotLineItemChanged(BObject* object, const BValue& value);

protected:
	BGroupBox*		_codeFormatGroupBox;
	BSpinBox*		_countSpinBox;
	BLineEdit*		_fontLineEdit;
	BButton*		_colorButton;
	BButton*		_groundButton;

	BGroupBox*		_lineFormatGroupBox;
	BButton*		_alignButton;
	BSpinBox*		_heightSpinBox;
	BSpinBox*		_spacingSpinBox;

};

#endif
